# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=run-parts
pkgver=4.11.2
pkgrel=2
pkgdesc="run-parts from the debianutils package"
url="https://packages.qa.debian.org/d/debianutils.html"
arch="all"
license="GPL-2.0-or-later"
subpackages="$pkgname-doc"
source="https://deb.debian.org/debian/pool/main/d/debianutils/debianutils_$pkgver.tar.xz"
builddir="$srcdir"/debianutils
options="!check"

build() {
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--bindir=/bin
	make
}

package() {
	# Install binaries to /bin to overwrite busybox's run-parts version.
	install -D -m755 run-parts $pkgdir/bin/run-parts
	install -D -m644 run-parts.8 $pkgdir/usr/share/man/man8/run-parts.8
}

sha512sums="0bd9098beee78b3c8dae839f0c29e9f142cbb22f2ced473cf7ae47a14d9493ba882c1829eba213780392a87a3223b3689729754c8ded80a091efaef3f6f903fd  debianutils_4.11.2.tar.xz"
